/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.text.TextUtils;
import android.widget.Toast;
import com.qihoopp.framework.HttpLoaderCallback;
import com.qihoopp.framework.LogUtil;
import org.json.JSONObject;

final class bf implements HttpLoaderCallback {
    public final void callback(int paramInt, JSONObject paramJSONObject) {
        if (paramInt == 2) {
            QcoinActivity.a(this.a).a();
            Toast.makeText(QcoinActivity.b(this.a), a.a(b.bj), 0).show();
            return;
        }
        if (paramInt == 3) {
            QcoinActivity.a(this.a).a();
            Toast.makeText(QcoinActivity.b(this.a), a.a(b.bl), 0).show();
            return;
        }
        if (paramInt == 5) {
            QcoinActivity.a(this.a).a();
            Toast.makeText(QcoinActivity.b(this.a), a.a(b.bi), 0).show();
            return;
        }
        if (paramInt == 4) {
            QcoinActivity.a(this.a).a();
            Toast.makeText(QcoinActivity.b(this.a), a.a(b.bh), 0).show();
            return;
        }
        if ((paramInt == -1) || (paramInt != 1))
            return;
        paramInt = null;
        String str1 = null;
        String str2 = null;
        String str3 = a.a(b.bn);
        if (paramJSONObject != null) {
            LogUtil.d("QcoinActivity", "setPwdCallback, json is :" + paramJSONObject.toString());
            try {
                paramInt = paramJSONObject.getString("result_code");
                str2 = paramJSONObject.optString("err_show_type");
                str1 = paramJSONObject.getString("result_msg");
            } catch (org.json.JSONException paramJSONObject) {
                LogUtil.e("QcoinActivity", "JSONException", paramJSONObject);
            }
            if (!(TextUtils.isEmpty(str1)))
                str3 = str1;
            if ((paramInt != null) && ("0000".equals(paramInt))) {
                LogUtil.d("QcoinActivity", "setPwdCallback, start pay.");
                QcoinActivity.c(this.a, QcoinActivity.f(this.a).b());
                return;
            }
            if ((paramInt != null) && ("600116".equals(paramInt))) {
                QcoinActivity.a(this.a).a();
                QcoinActivity.f(this.a).a();
                this.a.a(str2, "1", str1);
                return;
            }
            if ((paramInt != null) && ("600124".equals(paramInt))) {
                QcoinActivity.a(this.a).a();
                QcoinActivity.f(this.a).a();
                this.a.a(str2, "3", str1);
                return;
            }
        }
        QcoinActivity.a(this.a).a();
        QcoinActivity.f(this.a).a();
        this.a.a(str2, "1", str3);
    }
}